 |
 |
 |
 |
#147241 - 09/09/01 06:21 AM
[6.1x] ViewPMreply
|
Junior Member
Registered: 09/09/01
Posts: 5
|
This is Sleepy's Hack "ViewPMreply"
############################# # Sleepy custom hack # # To view PM when replying # # ########################### # # Only 2 files need changing # # public_pm_form.pl & ubb_pm.cgi # ############################ ################### #OPEN public_pm_form.pl ################### #find ###################
print<<NearBottom; $TBB
<CENTER> <INPUT TYPE="SUBMIT" NAME="submit" VALUE="$vars_wordlets{send_private_message}"> </CENTER>
</FORM>
NearBottom
################# # replace with #################
print<<NearBottom; $TBB
<CENTER> <INPUT TYPE="SUBMIT" NAME="submit" VALUE="$vars_wordlets{send_private_message}"> </CENTER>
</FORM>
<CENTER> $i_frame </CENTER>
NearBottom
################# # save and exit ################# # open ubb_pm.cgi ################# # find #################
sub pm_reply { local(%pm_user_index, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field);
################ # replace ################
sub pm_reply { local(%pm_user_index, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, $i_frame, $i_frame_alt, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field);
############### # find ###############
# get pm topic! if (-e "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi") { require "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi"; } else { &StandardHTML("$vars_wordlets_err{no_such_pm}"); }
############### #Below that ADD ###############
# set topic viewer: $go_to = "$vars_config{CGIURL}/ultimatebb.cgi?ubb=get_pm&d=$in{d}&t=$in{t}";
$i_frame_alt = &build_topic_review;
if ($vars_display{InlineFrame} eq 'TRUE') { $i_frame = qq(<IFRAME FRAMEBORDER="1" ALIGN="center" width="$vars_style{TableWidth}" HEIGHT="200" SCROLLING="YES" SRC="$go_to"> $i_frame_alt </IFRAME> ); } else { $i_frame = $i_frame_alt; }
################## ## Save and done ##################
__________________________________________________________
But there is a Problem: When you select the radio "NO" in CP >"General Display Settings">Inline Frame View of Topic on Reply Page? the Hack doesn't work. Because in ubb_lib_posting.cgi "sub build_topic_review" is only for ubb_new_reply.cgi: So can someone add a sub such as "sub pm_review" for ubb_pm.cgi in ubb_lib_posting.cgi? Thank you Very much!
###################################################### sub build_topic_review { local(@sort_topic, $total_posts, $summary, $row, $alt_color2, @posted, @user_profile, $listed_name, $this_user_number); @sort_topic = sort(@this_topic); $total_posts = @sort_topic;
if (($total_posts > 26) || ($post_permiss eq "private")) { $summary = qq(<font size="$vars_style{TextSize}" color="$vars_style{TableStripTextColor}" face="$vars_style{FontFace}"><a href="$go_to" target="_blank"> $vars_wordlets{topic_review_link}</a></font> ); } else { $summary = qq~ $TBT <tr> <td colspan="2" align="left" background="$vars_config{NonCGIURL}/bg1.jpg"> <font size="$vars_style{TextSize}" color="$vars_style{TableStripTextColor}" face="$vars_style{FontFace}"> <b>$vars_wordlets{topic_review}</b> </font></td></tr> ~;
$alt_color2 = "$vars_style{AltColumnColor2}";
foreach $row(@sort_topic) { if ($alt_color2 eq "$vars_style{AltColumnColor1}") { $alt_color2 = "$vars_style{AltColumnColor2}"; } else { $alt_color2 = "$vars_style{AltColumnColor1}"; }
if ($row !~ /^A/) { @posted = split(/||/, $row);
if (($posted[8] eq 'unreg') or ($posted[8] eq '')){ $listed_name = $posted[2]; } else {
if ($posted[11] eq '') {
# old post- we need to find user number $this_user_number = &GetUserNumber($posted[2]); if ((-e "$vars_config{MembersPath}/$this_user_number.cgi") && ($this_user_number ne '')) { @user_profile = &OpenProfile("$this_user_number"); } else { $user_profile[15] = $posted[2]; }
} else {
# already have user number if (-e "$vars_config{MembersPath}/$posted[11].cgi") { @user_profile = &OpenProfile("$posted[11]"); } else { $user_profile[15] = "$posted[10]"; chomp($posted[10]); }
}
chomp($user_profile[15]); if ($user_profile[15] ne '') { $listed_name = $user_profile[15]; } else { $listed_name = $posted[2]; } chomp($listed_name);
} $summary .= qq~ <tr bgcolor="$alt_color2"> <td valign="top"> <font size="$vars_style{TextSize}" face="$vars_style{FontFace}"> $listed_name </font></td> <td><font size="$vars_style{TextSize}" face="$vars_style{FontFace}">$posted[6]</font> </td></tr> ~; }
} $summary .= "$TBB
"; } return($summary);
}
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#147244 - 01/02/02 03:18 PM
Re: [6.1x] ViewPMreply
|
Member
Registered: 06/25/01
Posts: 199
|
This didn't work for 6.1.0.3. So, i Edited it as follows:
############################# # Sleepy custom hack # # To view PM when replying # # ########################### # # Only 2 files need changing # # public_pm_form.pl & ubb_pm.cgi # ############################ ################### #OPEN public_pm_form.pl ################### #find ###################
print <<NearBottom; $TBB
<CENTER> <INPUT TYPE="SUBMIT" NAME="submit" VALUE="$vars_wordlets{send_private_message}"> </CENTER>
</FORM>
NearBottom
################# # replace with #################
print <<NearBottom; $TBB
<CENTER> <INPUT TYPE="SUBMIT" NAME="submit" VALUE="$vars_wordlets{send_private_message}"> </CENTER>
</FORM>
<CENTER> $i_frame </CENTER>
NearBottom
################# # save and exit ################# # open ubb_pm.cgi ################# # find #################
sub pm_reply { local (%pm_user_index, %pm_user_index_sent, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field);
################ # replace ################
sub pm_reply { local (%pm_user_index, %pm_user_index_sent, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, $i_frame, $i_frame_alt, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field);
############### # find (do this twice) ###############
# get pm topic! if (-e "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi") { require "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi"; } else { &StandardHTML("$vars_wordlets_err{no_such_pm}"); }
############### #Below that ADD ###############
# set topic viewer: $go_to = "$vars_config{CGIURL}/ultimatebb.cgi?ubb=get_pm&d=$in{d}&t=$in{t}";
$i_frame_alt = &build_topic_review;
if ($vars_display{InlineFrame} eq 'TRUE') { $i_frame = qq(<IFRAME FRAMEBORDER="1" ALIGN="center" width="$vars_style{TableWidth}" HEIGHT="200" SCROLLING="YES" SRC="$go_to"> $i_frame_alt </IFRAME> ); } else { $i_frame = $i_frame_alt; }
################## ## Save and done ##################
__________________________________________________________
But there is a Problem: When you select the radio "NO" in CP >"General Display Settings">Inline Frame View of Topic on Reply Page? the Hack doesn't work. Because in ubb_lib_posting.cgi "sub build_topic_review" is only for ubb_new_reply.cgi: So can someone add a sub such as "sub pm_review" for ubb_pm.cgi in ubb_lib_posting.cgi? Thank you Very much!
######################################################
See original hack at top of forum for further information, i didn't need to continue past this point.
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|